Compact decoding of punctured block codes

ABSTRACT

k input bits are encoded according to a code with which is associated a m×n=m+k parity check matrix H. The resulting codeword is punctured, with n′&lt;n bits. The punctured codeword is exported to a corrupting medium such as a communication channel or a memory. A representation of the punctured codeword is imported from the corrupting medium and is decoded using a matrix H′ that is smaller than H. For example, H′ is m′=m−(n−n′)×n′ and is derived by merging selected rows of H.

FIELD AND BACKGROUND OF THE INVENTION

The present invention relates to punctured codes and, more particularly, to methods and devices for efficient decoding of punctured codewords.

A common conventional error control strategy, on time-varying channels, is to adapt the rate according to available channel state information (CSI), which is called rate adaptability. An effective way to realize this coding strategy is to use a single code and to puncture the code in a rate-compatible fashion, a so-called rate-compatible punctured code (RCPC). In such an approach, the transmitter systematically punctures parity bits in a codeword, and the locations of the punctured symbols are known to the receiver/receivers. Since the decoder for the lowest rate (the base code) is compatible with the decoders for the other higher rates, RCPC needs no additional complexity for the rate adaptability. Moreover, RCPC permits one to transmit redundancies progressively in conjunction with automatic repeat request (ARQ)

Consider a linear block code defined by a generator matrix Γ. To encode an information vector b, Γ is right-multiplied by b to produce a codeword vector c: c=bΓ  (1) Associated with Γ are one or more parity check matrices H that satisfy the matrix equation Hc=0  (2) for all the codeword vectors c of the code, i.e. a vector c belongs to the code if the vector satisfies equation (2). Typically, Γ, H and c are defined over the field GF(2), i.e. the elements of Γ, H and c are 0 or 1, and the addition of field elements is done as integer addition modulo 2.

In many cases, such as when Rate-Compatible Punctured Codes (RCPC) are being implemented, only a portion of the bits of the codeword c are transmitted over the channel, (in a communications scenario), or stored in a memory device, (storage applications). The locations of the transmitted bits are assumed to be known to both the transmitter and receiver, (of the communication system or storage device). Denote the transmitted or stored bits by c′ and refer to c′ as a sub-codeword. c′ also is referred to herein as a “punctured codeword”. The bits of c that are excluded from c′ are referred to herein as “punctured bits”. The bits received by the communications receiver, (or read by the memory reading device), typically are a noisy version of c′ that is referred to herein as a “representation” of c′, but by reuse of notation the received sub-codeword will still be denoted by c′.

The conventional method for decoding of c, given the representation of the sub-codeword c′, is by treating the punctured bits of c as “erasures”: during decoding, bits are inserted into c′ to bring the number of bits of c′ back up to the full number of bits of c, and then decoding is performed by decoding the code of the original matrix equation (2) while assigning special values (“erasures”) to the inserted bits. This procedure for decoding punctured codewords is referred to herein as “erasure decoding”.

To provide a concrete example of erasure decoding, Low-Density Parity Check (LDDC) codes now will be described.

A LDPC code is a linear binary block code whose parity-check matrix or matrices H is/are sparse. As shown in FIG. 1, a LDPC parity check matrix H is equivalent to a sparse bipartite “Tanner graph” G=(V, C, E) with a set V of N bit nodes (N=13 in FIG. 1), a set C of M check nodes (M=10 in FIG. 1) and a set E of edges (E=38 in FIG. 1) connecting bit nodes to check nodes. The bit nodes correspond to the codeword bits and the check nodes correspond to parity-check constraints on the bits. A bit node is connected by edges to the check nodes that the bit node participates with. In the matrix representation (matrix H of equation (2)) of the code on the left side of FIG. 1 an edge connecting bit node i with check node j is depicted by a non-zero matrix element at the intersection of row j and column i.

Next to the first and last check nodes of FIG. 1 are shown the equivalent rows of equation (1). The symbol “⊕” means “XOR”.

LDPC codes can be decoded using iterative message passing decoding algorithms. These algorithms operate by exchanging messages between bit nodes and check nodes along the edges of the underlying bipartite graph that represents the code. The decoder is provided with initial estimates of the codeword bits (based on the communication channel output or based on the read memory content). These initial estimates are refined and improved by imposing the parity-check constraints that the bits should satisfy as a valid codeword (according to equation (2)). This is done by exchanging information between the bit nodes representing the codeword bits and the check nodes representing parity-cheek constraints on the codeword bits, using the messages that are passed along the graph edges.

In iterative decoding algorithms, it is common to utilize “soft” bit estimations, which convey both the bit estimations and the reliabilities of the bit estimations.

The bit estimations conveyed by the messages passed along the graph edges can be expressed in various forms. A common measure for expressing a “soft” estimation of a bit v is as a Log-Likelihood Ratio (LLR)

${\log\frac{\Pr\left( {v = \left. 0 \middle| {{current}\mspace{14mu}{constraints}\mspace{14mu}{and}\mspace{14mu}{observations}} \right.} \right)}{\Pr\left( {v = \left. 1 \middle| {{current}\mspace{14mu}{constraints}\mspace{14mu}{and}\mspace{14mu}{observations}} \right.} \right)}},$ where the “current constraints and observations” are the various parity-check constraints taken into account in computing the message at hand and observations, such as the sequence of symbols received from a communication channel, corresponding to the bits participating in these parity checks. The sign of the LLR provides the bit estimation (i.e., positive LLR corresponds to v=0 and negative LLR corresponds to v=1). The magnitude of the LLR provides the reliability of the estimation (i.e., |LLR|=0 means that the estimation is completely unreliable and |LLR|=±∞ means that the estimation is completely reliable and the bit value is known).

Returning now to the discussion of decoding a punctured codeword by “erasure decoding”, if H is the parity-check matrix of an LDDC code, then the decoding is performed according to the Tanner graph associated with H, while assigning LLR=0 as an initial LLR to all the bits of the codeword c which are not bits of the sub-codeword c′ (i.e., to all the punctured bits of c).

Such erasure decoding may also be applied to other types of codes such as BCH codes.

In general, “erasure decoding” is more complex, and converges slower than, ordinary decoding. Moreover, typically the code is a systematic code, that encodes the input data bits as the codeword c by appending redundancy bits to the data bits, and the punctured bits are selected from among the redundancy bits, thus there is no real need to decode the punctured bits. A method that directly decodes the sub-codeword c′ and extracts the information bits, (which are typically the same as the information bits of c), would be of a significant benefit.

DEFINITIONS

The methodology described herein is applicable to encoding and decoding punctured codewords in at least two different circumstances. One circumstance is the storing of data in a storage medium, followed by the retrieving of the data from the storage medium. The other circumstance is the transmitting of data to a transmission medium, followed by the receiving of the data from the transmission medium. Therefore, the concepts of “storing” and “transmitting” of data are generalized herein to the concept of “exporting” data, and the concepts of “retrieving” and “receiving” data are generalized herein to the concept of “importing” data. Both “storing” data and “transmitting” data thus are special cases of “exporting” data, and both “retrieving” data and “receiving” data are special cases of “importing” data. The process of “exporting” data and then optionally “importing” the data is termed herein “porting” data.

The usual instantiation of a storage medium is as a memory. The usual instantiation of a transmission medium is as a communication channel. Both the storage medium and the transmission medium are examples of “corrupting” media. A “corrupting” medium is a medium that may introduce errors to data that are exported to the medium, so that the corresponding imported data may not be identical to the exported data.

“Encoding” is understood herein to mean turning an information vector (“b” in equation (1)) into a codeword (“c” in equation (1)). “Decoding” is understood herein to mean turning a representation of a codeword into the originally encoded information vector. It is a “representation” of the codeword, as imported from a corrupting medium, that is decoded, and not the codeword itself, because what is imported may be corrupted by noise relative to what is exported. Strictly speaking, the matrix H, or the equivalent Tanner graph as used in decoding by message passing, is used only to reconstruct the original codeword, not to provide the original information vector, but given the original codeword, it is well-known in the art how to recover the original information vector. Indeed, in the case of a systematic code, it is trivial to recover the original information vector because the codeword is just a concatenation of the original information vector and parity bits. In the appended claims, it is to be understood that using a matrix to decode a representation of a codeword means using the matrix to the extent that the matrix can be used to decode the representation of the codeword.

SUMMARY OF THE INVENTION

One embodiment provided herein is a method of porting k input bits, including: (a) encoding the input bits according to a first code with which is associated a parity check matrix H that has m rows and n=m+k columns, thereby producing a codeword of n bits; (b) puncturing the codeword, thereby providing a punctured codeword of n′<n bits; (c) exporting the punctured codeword to a corrupting medium; (d) importing a representation of the punctured codeword from the corrupting medium; (e) deriving, by merging selected rows of H, a matrix H′ that has m′=m−(n−n′) rows and n′ columns; and (f) using H′ to decode the representation of the punctured codeword.

Another embodiment provided herein is a memory device including: (a) a memory, and (b) a controller for storing k input bits in the memory and for recovering the input bits from the memory, the controller including: (i) an encoder for: (A) encoding the input bits according to a code with which is associated a parity check matrix H that has in rows and n=m+k columns, thereby producing a codeword of n bits, (B) puncturing the codeword, thereby providing a punctured codeword of n′<n bits, and (ii) a decoder for decoding a representation of the punctured codeword that has been read from the memory, the decoding being effected using a matrix H′ that has m′=m−(n−n′) rows and n′ columns and that is derived from H by merging selected rows of H.

Another embodiment provided herein is a system including: (a) a first memory; and (b) a host of the first memory including: (i) a second memory having stored therein code for managing the first memory by steps including: (A) encoding k input bits according to a code with which is associated a parity check matrix H that has m rows and n=m+k columns, thereby producing a codeword of n bits, (B) puncturing the codeword, thereby providing a punctured codeword of n′<n bits, (C) storing the punctured codeword in the first memory, (D) reading a representation of the punctured codeword from the first memory, and (E) decoding the representation of the punctured codeword using a matrix H′ that has m′=m−(n−n′) rows and n′ columns and that is derived from H by merging selected rows of H, and (ii) a processor for executing the code.

Another embodiment provided herein is a computer-readable storage medium having embodied thereon computer-readable code for managing a memory, the computer-readable code including: (a) program code for encoding k input bits according to a code with which is associated a parity check matrix H that has in rows and n=m+k columns, thereby producing a codeword of n bits; (b) program code for puncturing the codeword, thereby providing a punctured codeword of n′<n bits; (c) program code for storing the punctured codeword in a memory; (d) program code for reading a representation of the punctured codeword from the memory; and (e) program code for decoding the representation of the punctured codeword using a matrix H′ that has m′=m−(n−n′) rows and n′ columns and that is derived from H by merging selected rows of H.

Another embodiment provided herein is a communication system including: (a) a transmitter including: (i) an encoder for: (A) encoding k input bits according to a code with which is associated a parity check matrix H that has in rows and n=m+k columns, thereby producing a codeword of n bits, and (B) puncturing the codeword, thereby providing a punctured codeword of n′<n bits, and (ii) a modulator for transmitting the punctured codeword via a communication channel as a modulated signal; and (b) a receiver including: (i) a demodulator for receiving the modulated signal from the communication channel and for demodulating the modulated signal, thereby providing a representation of the punctured codeword, and (ii) a decoder for decoding the representation of the punctured codeword using a matrix H′ that has m′=m−(n−n′) rows and n′ columns and that is derived from H by merging selected rows of H.

Another embodiment provided herein is a method of recovering k input bits that have been encoded as a codeword of n bits according to a first code with which is associated a parity check matrix H that has m rows and n=m+k columns and that have been exported to a corrupting medium as a punctured codeword produced by eliminating n−n′ selected bits from the codeword, the method including: (a) importing a representation of the punctured codeword from the corrupting medium; (b) deriving, by merging selected rows of H, a matrix H′ that has m′=m−(n−n′) rows and n′ columns; and (c) using H′ to decode the representation of the punctured codeword.

Another embodiment provided herein is a decoder for decoding a representation of a punctured codeword, the punctured codeword having been produced by encoding k input bits according to a code with which is associated a parity check matrix H that has m rows and n=m+k columns, thereby providing a codeword of n bits, and then eliminating n−n′ selected bits from the codeword, the decoder including: (a) a decoding module for decoding the representation of the punctured codeword using a matrix H′ that has m′=m−(n−n′) rows and n′ columns and that is derived from H by merging selected rows of H.

Another embodiment provided herein is a receiver including: (a) a demodulator for receiving a modulated signal from a communication channel and for demodulating the modulated signal to provide a representation of a punctured codeword that had been produced by encoding k input bits according to a code with which is associated a parity check matrix H that has m rows and n=m+k columns, thereby providing a codeword of n bits, and then eliminating n−n′ selected bits from the codeword; and (b) a decoding module for decoding the representation of the punctured codeword using a matrix H′ that has m′=m−(n−n′) rows and n′ columns and that is derived from H by merging selected rows of H.

In the most general embodiment of a method for porting k input bits, the input bits are encoded according to a first code with which is associated a m×n parity check matrix H, where n=m+k. The encoding produces a codeword of n bits. The n-bit codeword is punctured, thereby providing a punctured codeword of n′<n bits. The punctured codeword is exported to a corrupting medium. A representation of the punctured codeword is imported from the corrupting medium. The representation of the punctured codeword is decoded using a matrix H′ that is smaller than H′ has m′=m−(n−n′) rows and n′ columns. H′ is derived from H by merging selected rows of H.

Preferably, the first code is a block code.

Preferably, H′ is a parity check matrix of a second code and the punctured codeword is a codeword of the second code.

In many embodiments of the method, m is an even number, m′=m/2, n′=n−m′, and H′ is derived by merging pairs of rows of H. Preferably, H′ is derived from H by merging consecutive pairs of rows of H.

Preferably, the decoding includes exchanging messages between the rows and columns of H′, as in LDPC. As noted above, exchanging messages between the rows and columns of a parity check matrix is equivalent to exchanging messages between the bit nodes and the check nodes of a Tanner graph.

In some embodiments of the method, the corrupting medium is a transmission medium. The exporting of the punctured codeword includes transmitting the punctured codeword via the transmission medium. The importing of the representation of the punctured codeword includes receiving the representation of the punctured codeword from the transmission medium.

In other embodiments of the method, the corrupting medium is a storage medium. The exporting of the punctured codeword includes storing the punctured codeword in the storage medium. The importing of the representation of the punctured codeword includes reading the representation of the punctured codeword from the storage medium.

A memory device that uses the method for porting k input bits includes a memory and a controller. The controller stores the input bits in the memory and recovers the input bits from the memory. The controller includes an encoder and a decoder. The encoder encodes the input bits according to the matrix H and punctures the resulting codeword to provide a punctured codeword. The decoder uses the matrix H′ to decode a representation of the punctured codeword that has been read from the memory.

A system that uses the method for porting k input bits includes a first memory and a host of the first memory. The host includes a second memory and a processor. The second memory has stored therein code for managing the first memory according to the method for porting k input bits as applied to a storage medium. The processor is for executing the code. The scope of the appended claims also includes a computer-readable storage medium having embodied thereon computer-readable code for managing such a first memory according to the method for porting k input bits.

A communication system that uses the method for porting k input bits includes a transmitter and a receiver. The transmitter includes an encoder and a modulator. The encoder encodes the input bits according to the matrix H and punctures the resulting codeword to provide a punctured codeword. The modulator transmits the punctured codeword via a communication channel as a modulated signal. The decoder includes a demodulator and a decoder. The demodulator receives the modulated signal from the communication channel and demodulates the modulated signal, thereby providing a representation of the punctured codeword. The decoder uses the matrix H′ to decode the representation of the punctured codeword.

In the most general embodiment of a method for recovering k input bits that have been encoded as a codeword of n bits according to a first code with which is associated an m×n=m+k parity check matrix H and that have been exported to a corrupting medium as a punctured codeword produced by eliminating n−n′ selected bits from the codeword, a representation of the punctured codeword is imported from the corrupting medium. The representation of the punctured codeword is decoded using a matrix H′ that is smaller than H: H′ has m′=m−(n−n′) rows and n′ columns. H′ is derived from H by merging selected rows of H.

Preferably, the first code is a block code.

Preferably, H′ is a parity check matrix of a second code and the punctured codeword is a codeword of the second code.

In many embodiments of the method, m is an even number, m′=m/2, n′=n−m′, and H′ is derived by merging pairs of rows of H. Preferably, H′ is derived from H by merging pairs of consecutive rows of H.

Preferably, the decoding includes exchanging messages between the rows and columns of H′, as in LDPC. As noted above, exchanging messages between the rows and columns of a parity check matrix is equivalent to exchanging messages between the bit nodes and the cheek nodes of a Tanner graph.

A decoder, for decoding a representation of a punctured codeword that was produced by encoding k input bits according to a code with which is associated a m×n=m+k parity check matrix H to provide a n-bit codeword and then eliminating n−n′ selected bits from the codeword, includes a decoding module that decodes the representation of the punctured codeword using a matrix H′ that is smaller than H: H′ has m′=m−(n−n′) rows and n′ columns. H′ is derived from H by merging selected rows of H.

In many embodiments of the decoder, m is an even number, in m′=m/2, n′=n−m′, and H′ is derived by merging pairs of rows of H.

Preferably, the decoder also includes a code reduction module for deriving H′ from H.

A receiver includes a demodulator and a decoding module. The demodulator receives a modulated signal from a communication channel and demodulates the modulated signal to provide a representation of a punctured codeword that had been produced by encoding k input bits according to a code with which is associated a m×n=m+k parity check matrix H to provide a n-bit codeword and then eliminating n−n′ selected bits from the codeword. The decoding module decodes the representation of the punctured codeword using a matrix H′ that is smaller than H: H′ has m′=m−(n−n′) rows and n′ columns. H′ is derived from H by merging selected rows of H.

In many embodiments of the receiver, m is an even number, m′=m/2, n′=n−m′, and H′ is derived by merging pairs of rows of H.

Preferably, the receiver also includes a code reduction module for deriving H′ from H.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments are herein described, by way of example only, with reference to the accompanying drawings, wherein:

FIG. 1 shows how a LDPC code can be represented as either a sparse parity check matrix or as a Tanner graph;

FIG. 2 illustrates the transformation of a parity check matrix H to a smaller matrix H′ for decoding a punctured codeword;

FIGS. 3 and 4 are simplified schematic high-level block diagrams of decoders for efficient decoding of representations of punctured codewords;

FIG. 5 is a high-level schematic block diagram of a flash memory device whose controller includes the decoder of FIG. 3 or the decoder of FIG. 4;

FIG. 6 is a detail of FIG. 5;

FIG. 7 is a high-level schematic block diagram of a memory system in which most of the functionality of the controller of FIG. 5 is emulated by software;

FIG. 8 is a high-level schematic block diagram of a communication system whose receiver includes the decoder of FIG. 3 or the decoder of FIG. 4;

FIG. 9 illustrates the context of a third variant of the method described herein;

FIG. 10 shows a Tanner graph for illustrating the transformation of H to H′ according to the third variant of the method described herein.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

The principles and operation of efficient decoding of a punctured codeword may be better understood with reference to the drawings and the accompanying description.

Denote the order of H as m×n, i.e. H has m rows and n columns. H is a parity check matrix of a code C, which of course implies that c is of length n (i.e. c has n elements). A punctured codeword c′ is derived from c by deleting some predefined coordinates of c. Denote the length of c′ by n′. Of course, n′<n. The set of all punctured codewords is itself a code, denoted C′. Preferably, the information bits of the original code C are not punctured, so that the punctured code C′ has the same size (i.e. the same number of codewords) as C, but has fewer redundancy bits.

Given H, c′, n, m and n′, a reduced matrix code H′ is computed, such that if c is a codeword satisfying equation (2) then the punctured sub-codeword c′ satisfies H′c′=0  (3) A matrix H′ constructed as described below is smaller (fewer rows and/or columns) than H, so that decoding of c′ according to equation (3) is easier and less complex then applying erasure decoding to equation (2).

Given H of order m×n, and given c′ of length n′, a matrix H′ of order m′×n′ is computed, where m′=m−(n−n′).

H′ is computed by performing a Gaussian elimination algorithm on the matrix H, with the goal of achieving all O-s in a selected m′ rows of H, for example in the first m′ rows of H, in all the columns associated with the punctured bits of c. After achieving this goal, and denoting the modified matrix by H″, the first m′ rows of H″ represent a reduced code, and the punctured bits do not participate in the code, since they are all multiplied by 0 in all the check equations.

Therefore the reduced code can be represented by taking only the first m′ rows of H″, and the n′ columns of H″ associated with non-punctured bits. H′ is those first m′ rows of H″ without the columns of H″ that are zeroed in the first m′ rows of H″ and that correspond to punctured bits. For example, if n=4096 and bits 4000, 4010, 4020, 4030 and 4040 of c are punctured (n′=4091), the columns of H″ that are zeroed in the first m′ rows of H″ are columns 4000, 4010, 4020, 4030 and 4040, and H′ is the first m′ rows of H″ without columns 4000, 4010, 4020, 4030 and 4040.

For example consider a code whose parity check matrix H has the form shown in FIG. 2. In this case the submatrices related to the punctured bits in the lower part of the matrix and the upper part of the matrix have the same structure, therefore replacing the upper half of the matrix with the sum (modulo 2) of the upper and lower halves of the matrix generates a matrix H″ with all 0-s in the first m′ rows of the columns associated with the punctured bits. Because only row operations are performed in order to generate H″ from H, both. H and H″ span the same linear subspace and both H and H″ are parity-check matrices of the code C. H′ is derived from H″ by eliminating all but the first m′ rows of H″ and the first n′ columns of H″, resulting in a (m−m′)×n′ parity-check matrix of the punctured code C′.

Moreover, in this example the matrix H′ is derived with a minimal number of row operations applied to each row (in this case one operation per row). Hence, the number of 1's in each row of H′ is at most twice the number of 1's in a row of H. If H is sparse then H′ usually can be considered as sparse. Therefore, if the original code is an LDPC code, the reduced code H′ usually can also be regarded as an LDPC code, thus it can be decoded efficiently, by generating the Tanner graph of the code and performing a message passing algorithm.

In most implementations, a limit is set on the number of row operations performed on H, in order to preserve certain properties, such as sparseness.

FIG. 3 is a simplified schematic high-level block diagram of a decoder 60 for implementing the efficient punctured decoding described above. Punctured decoder 60 includes a code reduction module 62 and a decoder module 64. The inputs to punctured decoder 60 are the code matrix H and the (possibly noisy and corrupted) representation of the sub-codeword c′. The reduced code matrix H′ is is computed in code reduction module 62 (preferably once, and then stored in a local volatile or nonvolatile memory (not shown)), and H′ is then provided to decoder module 64, together with the representation of sub-codeword c′. The output of decoder module 64 is the decoded codeword, which includes the information content of the original sub-codeword c′. This information is equal to the information content of the original codeword c.

FIG. 4 is a simplified schematic high-level block diagram of another decoder 80 for implementing the efficient punctured decoding described above. In addition to a code reduction module 82 and a decoder module 84, decoder 80 includes a non-volatile memory 86 for storing the code matrix H. The inputs to decoder 80 are the (possibly noisy and corrupted) representation of the sub-codeword c′ and information, such as the indices of the bits of c that were punctured to create c′, that tells code reduction module 82 which columns of H to zero out in the first m′ rows of H in order to create H″. Code reduction module 82 computes H′ as needed and preferably stores H′ locally, either in memory 86 or in a local non-volatile memory (not shown). As in decoder 60, H′ is provided to decoder module 84 together with the representation of sub-codeword c′. The output of decoder module 84 is the decoded codeword.

Code reduction modules 62 and 82 and decoder modules 64 and 84 may be implemented in hardware, in firmware, in software, or in combinations thereof, as is known in the art.

FIG. 5 is a high-level schematic block diagram of a flash memory device. A memory cell array 1 including a plurality of memory cells M arranged in a matrix is controlled by a column control circuit 2, a row control circuit 3, a c-source control circuit 4 and a c-p-well control circuit 5. Column control circuit 2 is connected to bit lines (BL) of memory cell array 1 for reading data stored in the memory cells (M), for determining a state of the memory cells (M) during a writing operation, and for controlling potential levels of the bit lines (BL) to promote the writing or to inhibit the writing. Row control circuit 3 is connected to word lines (WL) to select one of the word lines (WL), to apply read voltages, to apply writing voltages combined with the bit line potential levels controlled by column control circuit 2, and to apply an erase voltage coupled with a voltage of a p-type region on which the memory cells (M) are formed. C-source control circuit 4 controls a common source line connected to the memory cells (M). C-p-well control circuit 5 controls the c-p-well voltage.

The data stored in the memory cells (M) are read out by column control circuit 2 and are output to external I/O lines via an I/O line and a data input/output buffer 6. Program data to be stored in the memory cells are input to data input/output buffer 6 via the external I/O lines, and are transferred to column control circuit 2. The external I/O lines are connected to a controller 20.

Command data for controlling the flash memory device are input to a command interface connected to external control lines which are connected with controller 20. The command data inform the flash memory of what operation is requested. The input command is transferred to a state machine 8 that controls column control circuit 2, row control circuit 3, c-source control circuit 4, c-p-well control circuit 5 and data input/output buffer 6. State machine 8 can output a status data of the flash memory such as READY/BUSY or PASS/FAIL.

Controller 20 is connected or connectable with a host system such as a personal computer, a digital camera, a personal digital assistant. It is the host which initiates commands, such as to store or read data to or from the memory array 1, and provides or receives such data, respectively. Controller 20 converts such commands into command signals that can be interpreted and executed by command circuits 7. Controller 20 also typically contains buffer memory for the user data being written to or read from the memory array. A typical memory device includes one integrated circuit chip 21 that includes controller 20, and one or more integrated circuit chips 22 that each contains a memory array and associated control, input/output and state machine circuits. The trend, of course, is to integrate the memory array and controller circuits of such a device together on one or more integrated circuit chips. The memory device may be embedded as part of the host system, or may be included in a memory card that is removably insertable into a mating socket of host systems. Such a card may include the entire memory device, or the controller and memory array, with associated peripheral circuits, may be provided in separate cards.

FIG. 6 is an enlarged view of part of FIG. 5, showing that controller 20 includes an encoder 52 for encoding user data received from the host as one or more punctured codewords, circuitry 54 for instructing command circuits 7 to store the punctured codewords in memory cell array 1 and for instructing command circuits 7 to retrieving the stored punctured codewords from memory cell array 1, and a decoder 30, that could be, for example, either decoder 60 of FIG. 3 or decoder 80 of FIG. 4, for decoding the representation of the punctured codewords as retrieved by circuitry 54.

RCPC conventionally is thought of as applicable only to time-varying communication channels. It is not commonly appreciated that memories such as flash memories, that become less and less reliable over time, also are time-varying corrupting media. Controller 20 initially uses a relatively large number of punctured bits, and gradually reduces that number as memory cell array 1 becomes less reliable over time.

FIG. 7 is a high-level block diagram of a system 100 in which most of the functionality of controller 20 is effected by software. System 100 includes a processor 102 and four memory devices: a RAM 104, a boot ROM 106, a mass storage device (hard disk) 108 and a modified flash memory device of FIG. 5 as a flash memory device 112, all communicating via a common bus 114. The difference between the flash memory device of FIG. 5 and flash memory device 112 is that the controller of flash memory device 112 functions only as an interface to bus 114; the rest of the functionality of controller 20 of FIG. 5 as described above is emulated by flash memory driver code 110 that is stored in mass storage device 108 and that is executed by processor 102 to interface between user applications executed by processor 102 and flash memory device 112, and to manage the flash memory of flash memory device 112. In addition to the conventional functionality of such flash management driver code, driver code 110 emulates the functionality of controller 20 of FIG. 5 with respect to punctured encoding and decoding of codewords that are stored in memory cell array 1 and that are read from memory cell array 1, as described above. Driver code 110 typically is included in operating system code for system 100 but also could be freestanding code.

The components of system 100 other than flash memory device 112 constitute a host 120 of flash memory device 112. Mass storage device 108 is an example of a computer-readable storage medium bearing computer-readable driver code for efficient punctured decoding as described above. Other examples of such computer-readable storage media include read-only memories such as CDs bearing such code.

Although the methods and the decoders disclosed herein are intended primarily for use in data storage systems, these methods and decoders also are applicable to communications systems, particularly communications systems that rely on wave propagation through noisy transmission media.

FIG. 8 is a high-level schematic block diagram of a communication system 200 that includes a transmitter 210, a channel 203 and a receiver 212. Transmitter 210 includes an encoder 201 and a modulator 202. Receiver 212 includes a demodulator 204 and decoder 206 that could be, for example, either decoder 60 of FIG. 3 or decoder 80 of FIG. 4. Encoder 201 receives a message and generates a corresponding punctured codeword. Modulator 202 subjects the generated punctured codeword to a digital modulation such as BPSK, QPSK or multi-valued QAM and transmits the resulting modulated signal to receiver 212 via channel 203. At receiver 212, demodulator 204 receives the modulated signal from channel 203 and subjects the received modulated signal to a digital demodulation such as BPSK, QPSK or multi-valued QAM. Decoder 206 decodes the resulting representation of the original punctured codeword as described above.

In one variant of the method described above for efficient decoding of a punctured codeword, H′ is derived from H, not by Gaussian elimination, but by merging groups of rows of H. In each group, the number of 1's in each column associated with a punctured bit must be even, so that modulo 2 addition of the rows of the group sums those 1's to a 0.

An important special case is that of merging pairs of rows of H. Clearly, m must be an even number in this special case. The resulting matrix H′ has m/2 rows and n−m/2 columns. The parity check matrix of FIG. 2 is an example of a matrix H from which H′ can be derived by mergers of pairs of rows. In this case, m=2m′. The merging is done by modulo 2 addition of the pair (row 1 and row m′+1), the pair (row 2 and row m′+2), . . . , the pair (row m′ and row 2m′). In addition, the matrix H preferably is designed so that the merged rows have their 1's in different columns (except, of course, for the columns associated with punctured bits). This way, if all the rows of H have the same number of 1's, then all the rows of H′ also have the same number of 1's. This property is desirable for iterative decoding, as right regular LDPC codes can be designed to achieve a near optimal error correction capability. Moreover, the systematic structure facilitates an efficient decoder hardware design.

In this variant, H and H′ can be stored in the same array in non-volatile memory 86 of decoder 80. For each row of H, only the indices of the columns in which the elements of that row are 1's are stored. If H is a regular matrix (a matrix in which all the rows have the same number of 1's), the storage is even simpler because the indices are just stored successively and code reduction module 82 knows that after traversing a predetermined number of indices a new row of H has started. If H is designed so that the merged rows have their 1's in different columns, it is not necessary to store H′ separately because H′ can be generated on the fly by merging rows of H. The indices of the “1” elements of the merged rows of H also are indices of the “1” elements of the rows of H′.

If H′ is derived by merging consecutive rows of H (merging the first and second rows of H, merging the third and fourth rows of H, . . . , merging the m−1-th and m-th rows of H), decoder 80 can implement either unpunctured decoding (of a representation of an n-element unpunctured codeword) using H or punctured decoding (of a representation of a n′-element punctured codeword) using H′.

A second variant of the method described above addresses a potential shortcoming of the method. A full Gaussian elimination, all the way to a matrix H′ with m′ rows, may produce a matrix H′ that is not sufficiently sparse to use in decoding by message passing. Empirically, a useful criterion for sparseness is that the average column degree of H′, i.e. the average number of 1's per column of H′, should be less than 10 and also less than the number of rows of H′ divided by 4. (In good LDPC codes, the average column degrees of the parity check matrices are between 3 and 4.) The Gaussian elimination for deriving H′ from H is implemented until eliminating another column of H would produce a matrix H′ that is not sparse according to this criterion. Then, during the decoding, conventional erasure decoding is used to handle the punctured bits whose corresponding columns of H have not been eliminated.

One context for a third variant of the method described above is illustrated in FIG. 9 that illustrates the bipartite graph that represents a LDPC code as being divided into several sections in the following way: 1) Divide the set V of bit nodes into t disjoint subsets: V₁, V₂, . . . , V_(t) (such that V=V₁∪V₂∪ . . . ∪V_(t)). 2) For each subset V_(i) of bit nodes, form a subset C_(i) of check nodes, including all of the check nodes that are connected solely to the bit nodes in V_(i). 3) Form a subset C_(J) of external cheek nodes, including all of the check nodes that are not in any of the check node subsets formed so far, i.e. C_(J)=C\(C₁∪C₂∪ . . . ∪C_(t)). 4) Divide the graph G into t sub-graphs G₁, G₂, . . . , G_(t) such that G=(V_(i), C_(i), E_(i)) where E_(i) is the set of edges connected between bit nodes in V_(i) and check nodes in C_(i). Denote the edges connected to the set C_(J) by E_(J) (note that E_(J)=E\(E₁∪E₂∪ . . . ∪E_(t))).

In these embodiments, the graph G is processed according to a special message passing schedule, by iteratively performing decoding phases, and in each decoding phase exchanging messages along the graph edges in the following order:

-   -   for i=1 through t         -   1. Send messages from check nodes cεC_(J) to bit nodes             vεV_(i) along edges in E_(J), depicted as the R_(CJVi)             messages in FIG. 9. Set messages from check nodes cεC_(i) to             bits nodes vεV_(i) to zero, depicted by the Rc_(i)v_(i)             messages in FIG. 9. Set initial bit estimations for every             bit vεV_(i), depicted as the P_(Vi) messages in FIG. 9. Note             that the messages R_(CJVi) are the result of activating the             decoder for the other t−1 sub-graphs G_(k), k≠i, prior to             this step. In the event that other sub-graphs have not been             processed yet, their corresponding messages Q_(vicJ) in FIG.             9 are set to the initial bit estimates as read from the             memory or received from the communication channel. Note that             the initial (LLR) estimates of punctured bits are             identically zero.         -   2. Perform one or more iterations by sending messages from             bit nodes in V_(i) to check nodes in C_(i), and messages             from check nodes in C_(i) to bit nodes in V_(i), along the             edges in E_(i), according to some schedule. This is depicted             as the Qv_(i)c_(i) and Rc_(i)v_(i) messages in FIG. 9.         -   3. Send messages from bit nodes in V_(i) to check nodes in             C_(J) along the edges in E_(J), depicted as the Qv_(i)c_(J)             messages in FIG. 9.

Decoding continues until the decoder converges to a valid codeword, satisfying all the parity-check constraints, or until a maximum number of allowed decoding phases is reached. The stopping criterion for the message passing within each sub-graph i is similar: iterate until either all the parity-cheek constraints within this sub-graph are satisfied or a maximum number of allowed iterations is reached. In general, the maximum allowed number of iterations may change from one sub-graph to another or from one activation of the decoder to another.

In some implementations of this context, the check nodes in C_(J) are connected only to bit nodes corresponding to the punctured bits. The message exchange within the isolated sub-graphs G_(i) is performed using a matrix H′ that ignores not only the punctured bits but also the bits that are connected by H only to punctured bits. FIG. 10 shows a Tanner graph that illustrates how such an H′ is derived from such an H. The numbered circles are bit nodes. The numbered squares are check nodes. Note that the Tanner graph of FIG. 10 is only for illustrating the concept of the third variant and is not necessarily a Tanner graph that would be useful in the context of FIG. 9. The matrix H that corresponds to the Tanner graph of FIG. 10 is:

$\begin{matrix} {H = \begin{pmatrix} 1 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 & 1 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 1 & 0 & 1 & 0 & 0 \\ 1 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 \end{pmatrix}} & (4) \end{matrix}$

Bits 7, 8 and 9 are punctured. H′ is derived by modulo-2 addition of rows 1 and 4, rows 2 and 5, and rows 3 and 6, followed by omission of the last row and the last four columns. Hence:

$\begin{matrix} {H^{\prime} = \begin{pmatrix} 1 & 1 & 0 & 1 & 1 & 0 \\ 0 & 1 & 1 & 0 & 1 & 1 \\ 1 & 0 & 1 & 1 & 0 & 1 \end{pmatrix}} & (5) \end{matrix}$

A limited number of embodiments of methods for punctured decoding, and of devices and systems that use the methods, have been described. It will be appreciated that many variations, modifications and other applications of the methods, devices and system may be made. 

1. A method of porting k input bits, comprising: (a) encoding the input bits according to a first code with which is associated a parity check matrix H that has m rows and n=m+k columns, thereby producing a codeword of n bits; (b) puncturing the codeword, thereby providing a punctured codeword of n′<n bits; (c) exporting the punctured codeword to a corrupting medium; (d) importing a representation of the punctured codeword from the corrupting medium; (e) deriving, by merging selected rows of H, a matrix H′ that has m′=m−(n−n′) rows and n′ columns, wherein merging selected rows of H is terminated when further merging of the selected rows would produce a matrix H′ that fails to satisfy a predetermined criterion of sparseness; and (f) using H′ to decode the representation of the punctured codeword.
 2. The method of claim 1, wherein the first code is a block code.
 3. The method of claim 1, wherein m is an even number, wherein H′ is derived by merging pairs of rows of H, wherein m′=m/2, wherein n′=n−m′, and wherein H is designed such that the pairs of rows have one's in different columns resulting in H′ being a right regular matrix.
 4. The method of claim 3, wherein H′ is derived from H by merging pairs of consecutive rows of H.
 5. The method of claim 1, wherein the decoding includes exchanging messages between the rows of H′ and the columns of H′.
 6. The method of claim 1, wherein the corrupting medium is a transmission medium, wherein the exporting includes transmitting the punctured codeword via the transmission medium, and wherein the importing includes receiving the representation of the punctured codeword from the transmission medium.
 7. The method of claim 1, wherein the corrupting medium is a storage medium, wherein the exporting includes storing the punctured codeword in the storage medium, and wherein the importing includes reading the representation of the punctured codeword from the storage medium.
 8. A memory device comprising: (a) a memory, and (b) a controller for storing k input bits in the memory and for recovering the input bits from the memory, the controller including: (i) an encoder for: (A) encoding the input bits according to a code with which is associated a parity check matrix H that has m rows and n=m+k columns, thereby producing a codeword of n bits, (B) puncturing the codeword, thereby providing a punctured codeword of n′<n bits, and (ii) a decoder for decoding a representation of the punctured codeword that has been read from the memory, the decoding being effected using a matrix H′ that has m′=m−(n−n′) rows and n′ columns and that is derived from H by merging selected rows of H, wherein merging selected rows of H is terminated when further merging of the selected rows would produce a matrix H′ that fails to satisfy a predetermined criterion of sparseness and wherein H and H′ are stored in a same array within the memory.
 9. A system comprising: (a) a first memory; and (b) a host of the first memory including: (i) a second memory having stored therein code for managing the first memory by steps including: (A) encoding k input bits according to a code with which is associated a parity check matrix H that has m rows and n=m+k columns, thereby producing a codeword of n bits, (B) puncturing the codeword, thereby providing a punctured codeword of n′<n bits, (C) storing the punctured codeword in the first memory, (D) reading a representation of the punctured codeword from the first memory, and (E) decoding the representation of the punctured codeword using a matrix H′ that has m′=m−(n−n′) rows and n′ columns, and that is derived from H by merging selected rows of H, wherein merging selected rows of H is terminated when further merging of the selected rows would produce a matrix H′ that fails to satisfy a predetermined criterion of sparseness, and (ii) a processor for executing the code.
 10. The system of claim 9, wherein the code for managing the first memory also includes code for deriving H′ from H.
 11. A computer-readable storage medium having embodied thereon computer-readable code for managing a memory, the computer-readable code comprising: (a) program code for encoding k input bits according to a code with which is associated a parity check matrix H that has m rows and n=m+k columns, thereby producing a codeword of n bits; (b) program code for puncturing the codeword, thereby providing a punctured codeword of n′<n bits; (c) program code for storing the punctured codeword in a memory; (d) program code for reading a representation of the punctured codeword from the memory; and (e) program code for decoding the representation of the punctured codeword using a matrix H′ that has m′=m−(n−n′) rows and n′ columns and that is derived from H by merging selected rows of H, wherein merging selected rows of H is terminated when further merging of the selected rows would produce a matrix H′ that fails to satisfy a predetermined criterion of sparseness.
 12. The computer-readable storage medium of claim 11, wherein the computer-readable code further comprises: (f) program code for deriving H′ from H.
 13. A communication system comprising: (a) a transmitter including: (i) an encoder for: (A) encoding k input bits according to a code with which is associated a parity check matrix H that has m rows and n=m+k columns, thereby producing a codeword of n bits, and (B) puncturing the codeword, thereby providing a punctured codeword of n′<n bits, and (ii) a modulator for transmitting the punctured codeword via a communication channel as a modulated signal; and (b) a receiver including: a demodulator for receiving the modulated signal from the communication channel and for demodulating the modulated signal, thereby providing a representation of the punctured codeword, and (ii) a decoder for decoding the representation of the punctured codeword using a matrix H′ that has m′=m−(n−n′) rows and n′ columns and that is derived from H by merging selected rows of H, wherein merging selected rows of H is terminated when further merging of the selected rows would produce a matrix H′ that fails to satisfy a predetermined criterion of sparseness.
 14. A method of recovering k input bits that have been encoded as a codeword of n bits according to a first code with which is associated a parity check matrix H that has m rows and n=m+k columns and that have been exported to a corrupting medium as a punctured codeword produced by eliminating n−n′ selected bits from the codeword, the method comprising: (a) importing a representation of the punctured codeword from the corrupting medium; (b) deriving, by merging selected rows of H, a matrix H′ that has m′=m−(n−n′) rows and n columns, wherein merging selected rows of H is terminated when further merging of the selected rows would produce a matrix H′ that fails to satisfy a predetermined criterion of sparseness; and (c) using H′ to decode the representation of the punctured codeword.
 15. The method of claim 14, wherein the first code is a block code.
 16. The method of claim 14, wherein m is an even number, wherein H′ is derived by merging pairs of rows of H, wherein m′=m/2, and wherein n′=n−m′.
 17. The method of claim 16, wherein H′ is derived from H by merging pairs of consecutive rows of H.
 18. The method of claim 14, wherein the decoding includes exchanging messages between the rows of H′ and the columns of H′.
 19. A decoder for decoding a representation of a punctured codeword, the punctured codeword having been produced by encoding k input bits according to a code with which is associated a parity check matrix H that has m rows and n=m+k columns, thereby providing a codeword of n bits, and then eliminating n-n′ selected bits from the codeword, the decoder comprising: (a) a decoding module for decoding the representation of the punctured codeword using a matrix H′ that has m′=m−(n−n) rows and n′ columns and that is derived from H by merging selected rows of H, wherein merging selected rows of H is terminated when further merging of the selected rows would produce a matrix H′ that fails to satisfy a predetermined criterion of sparseness.
 20. The decoder of claim 19, further comprising: (b) a code reduction module for deriving H′ from H.
 21. A receiver comprising: (a) a demodulator for receiving a modulated signal from a communication channel and for demodulating the modulated signal to provide a representation of a punctured codeword that had been produced by encoding k input bits according to a code with which is associated a parity check matrix H that has m rows and n=m+k columns, thereby providing a codeword of n bits, and then eliminating n−n′ selected bits from the codeword; and (b) a decoding module for decoding the representation of the punctured codeword using a matrix H′ that has m′=m−(n−n′) rows and n′ columns and that is derived from H by merging selected rows of H, wherein merging selected rows of H is terminated when further merging of the selected rows would produce a matrix H′ that fails to satisfy a predetermined criterion of sparseness.
 22. The receiver of claim 21, further comprising: (c) a code reduction module for deriving H′ from H. 